Constructor Method
Fired automatically when an object is instantiated.
Syntax
Constructor [Parameter List]
Parameters | ||
Parameter List (Optional) |
Any |
Optional list of parameters. |
Notes
When you create a new object, you will sometimes want to perform some sort of initialization on the object. The constructor is a mechanism for doing this. A class's constructor is the method that will be executed automatically when an instance of the class is created.
You write a constructor for a custom class by creating a new method for the class and naming it "Constructor". See the chapter on custom classes in the Users Guide for more information on writing constructors.
See Also
Destructor Method